#pragma once

#ifdef __cplusplus
extern "C" {
#endif

#define PCM_BUFF_MAX_LEN			3072

typedef struct Record_STREAM_INFO_S
{
	void * pdata;
	int datalen;
	int pts;
	int iskey;

	char sps[128];
	int spslen;

	char pps[64];
	int ppslen;

	char aacspec[4];
	int aacspeclen;
	int audiopts;

	int callend;

}RecordStreamInfo_T;


typedef struct Record_STREAM_REMAIN_INFO_S
{
	int alreadyflag;
	int count;
	int spsflag;
	int iframeindex;
#if 0
	int tick_interval;
	int videopts;
	int audiopts;
#endif
	void * aacheadle;
	int bitsize;
	int nInputSamples;
	int nMaxOutputBytes;
	int pcmleftlen;
	char pcmbuf[PCM_BUFF_MAX_LEN];
	char  aacbuf[1024];
	

}RecordStreamRemain_T;

void Recordfile_RemoveFileDir(const char * dir);


int API_MP4Record_Start(struct tm * timerecord);


int API_MP4Record_Stop(char * filename);




#ifdef __cplusplus
}
#endif


